Component({
	data:{
		selected:0,//当前选中
		list:[
			{
				"pagePath":"/pages/index/index",
				'iconPath':"/static/images/work.png",
				"selectedIconPath":"/static/images/work_active.png",
				"text":'工作'
			},
			{
				"pagePath": "/pages/assistant/assistant",
				"text": "助手",
				"iconPath": "/static/images/helper.png"
			},
		  {
        "pagePath": "/pages/common/common",
        "text": "常用"
			},
			{
				"pagePath": "/pages/analyse/analyse",
				"text": "分析",
				"iconPath": "/static/images/analyse_bar.png"
			},
			{
			  "pagePath": "/pages/my/my",
				"text": "我",
				"iconPath": "/static/images/my.png"
			},
		]
	},
	//方法 
	methods:{
		switchTab(e){
			console.log(e);
			const {index,url}=e.currentTarget.dataset;
			console.log(url,index);
			if(this.data.selected==index || index==undefined) return;
			this.setData({
				selected:index
			})
			wx.switchTab({
				url
			})
		}
	}
})